import request from '@/utils/request'

// 创建视频信息
export function createVideoInfo(data) {
  return request({
    url: '/audit/video-info/create',
    method: 'post',
    data: data
  })
}

// 更新视频信息
export function updateVideoInfo(data) {
  return request({
    url: '/audit/video-info/update',
    method: 'put',
    data: data
  })
}

// 删除视频信息
export function deleteVideoInfo(id) {
  return request({
    url: '/audit/video-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得视频信息
export function getVideoInfo(id) {
  return request({
    url: '/audit/video-info/get?id=' + id,
    method: 'get'
  })
}

// 获得视频信息列表
export function getVideoInfoList(params) {
  return request({
    url: '/audit/video-info/list',
    method: 'get',
    params
  })
}
// 导出视频信息 Excel
export function exportVideoInfoExcel(params) {
  return request({
    url: '/audit/video-info/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

// ==================== 自定义操作 ====================
// 获得主要视频配置信息
export function getMasterFileConfig() {
  return request({
    url: '/audit/video-info/master-file-config',
    method: 'get'
  })
}
